package com.shse.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.shse.dao.MyBatisUserDao;

@Component
public class MybatisService {

	@Autowired
	private MyBatisUserDao myBatisUserDao;
	
	
	@Transactional	
	public void transferMoney(Long srcUserId, Long targetUserId, double count){
		myBatisUserDao.delMoney(srcUserId, count);		
		myBatisUserDao.addMoney(targetUserId, count);
	}
}
